package com.ssm.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.ssm.dao.UserDao;
import com.ssm.model.User;
@Component
public class UserServiceImpl implements UserService{
	 @Autowired
	private UserDao dao;

	public boolean canLogin(User user) {
		User real = dao.findUserByName(user.getName());
		if(real !=null && real.getPassword().equals(user.getPassword())){
			return true;
		}
		return false;
	}
	 
}
